﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Jinjia.Approve.Entity.Entity.JJFlow;
using Jinjia.Approve.Model.Input.JJFlow;
using Jinjia.Approve.Model.VM.JJFlow;
using Jinjia.Approve.Model.VM.JJFlow.DTO;
using Jinjia.Core.BaseInfrastructure.StorageModel.Model;

namespace Jinjia.Approve.IService.JJFlow.Action
{
    public interface IJJFLowActionApprove
    {
        Task<NodeInfo> Approve(int instance_id, int user_id, string remark, int is_auto_approve = 0);

        Task<List<jj_flow_instance_emp>> GetInstanceEmp(string biz_order_id, string modular_key);

        Task<bool> GetUserPower(string system_key, string big_modular_key, string modular_key, int user_id);

        /// <summary>
        /// 我已审批操作的数据
        /// </summary>
        /// <param name="system_key"></param>
        /// <param name="big_modular_key"></param>
        /// <param name="modular_key"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        Task<List<string>> GetUserProcessedBizOrderId(string system_key, string big_modular_key, string modular_key, int user_id);

        /// <summary>
        /// 获取我提交审核的数据
        /// </summary>
        /// <param name="system_key"></param>
        /// <param name="big_modular_key"></param>
        /// <param name="modular_key"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        Task<List<string>> GetUserCreateApplyBizOrderId(string system_key, string big_modular_key, string modular_key, int user_id);

        /// <summary>
        /// 审批单列表
        /// </summary>
        /// <param name="searchCondition"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        Task<PageListSearchResultVM<JJInstanceViewModel>> GetInstancePageList(JJInstanceSearchCondition searchCondition, int user_id);

        /// <summary>
        /// 用户是否有审核数据权限
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<UserPowerResponse> CheckUserPower(CheckQueryRequest request);

        Task<List<EmpInfo>> GetReviewedUser(int node_id, int instance_id, int template_id, int is_complete);
    }
}